package fr.cephb.operonj.core.db.binding;

import com.sleepycat.bind.tuple.TupleBinding;
import com.sleepycat.bind.tuple.TupleInput;
import com.sleepycat.bind.tuple.TupleOutput;

import fr.cephb.operonj.core.db.key.BuildChrom;

public class BuildChromBinding extends TupleBinding<BuildChrom>
	{
	@Override
	public BuildChrom entryToObject(TupleInput input)
		{
		return new BuildChrom(
			input.readInt(),
			input.readInt()
			);
		}

	@Override
	public void objectToEntry(BuildChrom c, TupleOutput output)
		{
		output.writeInt(c.getBuildId());
		output.writeInt(c.getChromId());
		}

	}
